package cn.getech.data.development.mapper;

import cn.getech.data.development.entity.Alarm;
import cn.getech.data.development.model.dto.AlarmNotifyDto;
import cn.getech.data.development.model.vo.AlarmSearchVO;
import cn.getech.data.development.model.vo.AlarmVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigInteger;
import java.util.List;

@Mapper
public interface AlarmMapper extends BaseMapper<Alarm> {

    IPage<AlarmVO> alarmPage(Page page, @Param("params") AlarmSearchVO vo);

    List<AlarmVO> alarmVoList(@Param("receivedPer") String receivedPer);

    List<AlarmNotifyDto> getAlarmNotifyUsers(@Param("alarmObjectIds") List<Integer> alarmObjectIds);

    List<AlarmNotifyDto> getRecriverList(@Param("tenantId")Integer tenantId);

    List<AlarmNotifyDto> getCreaterList(@Param("tenantId")Integer tenantId);

    int updateNoDisturbingTimeNull(@Param("alarmId") Integer alarmId);

    String getUsrNameById(@Param("userId") BigInteger userid);
}
